from selenium import webdriver
from selenium.webdriver.common.by import By
import time
## 路径格式  //标签名[@属性名='属性值']

d = webdriver.Chrome()
d.get('http://192.168.0.125:9009/wp-login.php')
time.sleep(2)
a = d.find_element(By.XPATH, '//input[@name="log"]')
a.send_keys('admin')
time.sleep(2)
b = d.find_element(By.XPATH, '//input[@name="pwd"]')
b.send_keys('admin123')
time.sleep(2)
c = d.find_element(By.XPATH, '//input[@name="wp-submit"]')
c.click()
time.sleep(2)
d.quit()
